package com.margo.project.web.workbench;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import com.margo.project.web.workbench.interceptor.WorkbenchAttributeSourceAdvisor;
import com.margo.project.web.workbench.interceptor.WorkbenchInterceptor;

@Configuration
public class WorkbenchConfiguration {

	@Bean
	public WorkbenchInterceptor workbenchInterceptor() {
		return new WorkbenchInterceptor();
	}
	
	@Bean
	public WorkbenchAttributeSourceAdvisor workbenchAttributeSourceAdvisor() {
		WorkbenchAttributeSourceAdvisor attributeSourceAdvisor=new WorkbenchAttributeSourceAdvisor();
		attributeSourceAdvisor.setAdvice(workbenchInterceptor());
		return attributeSourceAdvisor;
	}
}
